import {SysMenu} from "../entity/SysMenu";
import {conn} from '../../../core/typeorm/db'

class SysMenuService {
    private repository: any;


    constructor() {
        conn.then(con => {
            this.repository = con.manager.getRepository(SysMenu)
        })
    }

    findById(id: number): Promise<SysMenu> {
        return this.repository.findOne(id)
    }
}

export const sysMenuService = new SysMenuService()
